#!/usr/bin/env python

import csv, sys, re
from common import read_table

if __name__ == "__main__":
    a, m, n = read_table(sys.stdin)
    b = [["" for j in range(n)] for i in range((m + 1) / 2)]
    for y in range(n):
        for x in range(0, m, 2):
            b[x / 2][y] = a[x][y]
            if x + 1 < m:
                b[x / 2][y] += " " + a[x + 1][y]

    fout = csv.writer(sys.stdout)
    for x in range((m + 1) / 2):
        fout.writerow(b[x])
